using System.Collections.Generic;
/// <summary>
/// SpriteAtlas枚举模版
/// </summary>
public enum enHFSpriteAtlas
{
	ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP,
	ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG,
	ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE,
}
/// <summary>
/// 全局SpriteAtlas
/// </summary>
public sealed partial class HFGlobal_SpriteAtlas : AbsHFSingleRunTime<HFGlobal_SpriteAtlas>
{
	/// <summary>
	/// 图集映射
	/// </summary>
	readonly static Dictionary<enHFLanguageClassify,
	Dictionary<enHFSpriteAtlas, Dictionary<enHFLanguageRootFolder,int>>> mSpriteAtlasAttrHashCodeMaping =
	new Dictionary<enHFLanguageClassify, Dictionary<enHFSpriteAtlas, Dictionary<enHFLanguageRootFolder,int>>>()
	{	
	{
	enHFLanguageClassify.CN,
	new Dictionary<enHFSpriteAtlas, Dictionary<enHFLanguageRootFolder,int>>()
	{
	{
	enHFSpriteAtlas.ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP,
	new Dictionary<enHFLanguageRootFolder,int>(){
	{enHFLanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,205678913}, //"ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP_CN" HFUniqueHashCode 205678913
	}
	},
	{
	enHFSpriteAtlas.ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG,
	new Dictionary<enHFLanguageRootFolder,int>(){
	{enHFLanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,415450775}, //"ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG_CN" HFUniqueHashCode 415450775
	}
	},
	{
	enHFSpriteAtlas.ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE,
	new Dictionary<enHFLanguageRootFolder,int>(){
	{enHFLanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,1129231628}, //"ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE_CN" HFUniqueHashCode 1129231628
	}
	},
	}
	},
	};
	/// <summary>
	/// HFSpriteAtlas_AssetBundleAttribute属性映射
	/// </summary>
	static readonly Dictionary<int, HFSpriteAtlas_AssetBundleAttribute> mHFSpriteAtlas_AssetBundleAttributeMaping = new Dictionary<int, HFSpriteAtlas_AssetBundleAttribute>() {
	{205678913,new HFSpriteAtlas_AssetBundleAttribute(enHFLanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,"SpriteAtlasAssets/commonPopup/ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_COMMONPOPUP_{0}.spriteatlas")},	
	{415450775,new HFSpriteAtlas_AssetBundleAttribute(enHFLanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,"SpriteAtlasAssets/UIBag/ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBAG_{0}.spriteatlas")},	
	{1129231628,new HFSpriteAtlas_AssetBundleAttribute(enHFLanguageRootFolder.ASSETS_GAME_GAMEHFRESOURCE,"SpriteAtlasAssets/UIBattle/ASSETS_GAME_GAMEHFRESOURCE_SPRITEATLAS_UIBATTLE_{0}.spriteatlas")},	
	};
	/// <summary>
	/// 获得图集属性
	/// </summary>
	/// <param name="_spriteAtlas">图集</param>
	/// <param name="_rootFolder">资源根路径</param>
	/// <returns>图集属性</returns>
	public HFSpriteAtlas_AssetBundleAttribute GetSpriteAtlasPath(enHFSpriteAtlas _spriteAtlas, enHFLanguageRootFolder _rootFolder)
	{
	HFSpriteAtlas_AssetBundleAttribute result = null;
	Dictionary<enHFSpriteAtlas, Dictionary<enHFLanguageRootFolder, int>> spa = null;
	Dictionary<enHFLanguageRootFolder, int> folder = null;
	int key = 0;
	if (mSpriteAtlasAttrHashCodeMaping.TryGetValue(HFLanguageHelper.language, out spa))
	{//查询当前语言包数据
	if (spa.TryGetValue(_spriteAtlas, out folder))
	{
	if (folder.TryGetValue(_rootFolder, out key))
	{
	if (mHFSpriteAtlas_AssetBundleAttributeMaping.TryGetValue(key, out result))
	{ 
	}
	}
	}
	}
	if (result == null)
	{//查询默认语言包数据
	if (mSpriteAtlasAttrHashCodeMaping.TryGetValue(HFLanguageHelper.defaultAlternateLanguage, out spa))
	{
	if (spa.TryGetValue(_spriteAtlas, out folder))
	{
	if (folder.TryGetValue(_rootFolder, out key))
	{
	if (mHFSpriteAtlas_AssetBundleAttributeMaping.TryGetValue(key, out result))
	{
	}
	}
	}
	}
	}
	return result;
	}
	/// <summary>
	/// 获得图集属性	
	/// </summary>
	/// <param name="_spriteAtlasName">参考SpriteAtlasManager.atlasRequested</param>
	/// <returns>图集属性</returns>
	public HFSpriteAtlas_AssetBundleAttribute GetSpriteAtlasPath(string _spriteAtlasName)
	{
	int key = _spriteAtlasName.ToUpper().HFUniqueHashCode();
	return mHFSpriteAtlas_AssetBundleAttributeMaping.ContainsKey(key) ? mHFSpriteAtlas_AssetBundleAttributeMaping[key] : null;
	}
}